﻿using System;
using System.Collections.Generic;
using System.Linq;

namespace LWH.ByteProtocol
{
    /// <summary>
    /// 数据固定的属性，一般用于表示帧头帧尾
    /// </summary>
    public class FixedDataProperty : SkeletalProperty
    {
        readonly byte[] mData;

        public FixedDataProperty(OwnerProperty ownerProperty, byte[] data) : base(ownerProperty)
        {
            mData = (byte[])data.Clone();
        }


        override public byte[] getData()
        {
            return (byte[])mData.Clone();
        }


        override public int getLength()
        {
            return mData.Length;
        }


        override public void setData(byte[] data, int offset, int length)
        {
        }
    }
}
